package com.com.java8.lamdaexpression;

import java.io.File;
import java.io.FileFilter;
import java.util.ArrayList;

/**
 * Created by User on 05/09/2014.
 */
public class BookExample {

    public File[] listFiles(FileFilter filter) {
        String ss[] = list();
        if (ss == null) return null;
        ArrayList<File> files = new ArrayList<>();
        for (String s : ss) {
            File f = new File("");
            if ((filter == null) || filter.accept(f))
                files.add(f);
        }
        return files.toArray(new File[files.size()]);
    }

    public String[] list(){
        return null;
    }

    public static void main(String[] args) {
        BookExample dir = new BookExample();
        //File[] files = dir.listFiles( (File f) -> return f.isFile();});

    }
}
